package com.File文件;

import java.io.File;
import java.io.IOException;

public class FileCon {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\黑马视频\\file\\son");
        File file1 = new File("D:\\黑马视频\\file\\son\\index.txt");
        System.out.println(file);
        file1.createNewFile();
        System.out.println(file1.getAbsoluteFile());
        System.out.println(file1.getAbsolutePath());
        System.out.println(file.getName());
        for (int i = 0; i < file.list().length; i++) {
            System.out.println(file.list()[i]);
        }
        for (int i = 0; i < file.listFiles().length; i++) {
            System.out.println(file.list()[i]);
        }
        System.out.println(file1);
    }
}
